# -*- Python -*-

# Allow import of our local utilities.
sys.path.append(os.path.dirname(os.path.dirname(__file__)))
import DEFormats
import DEUtils

# It will compile you.  That's what it does.  That's all it does.
config.name = 'The Compilator'

# Load common definitions.
lit_config.load_config(config, lit_config.params['site'])

# test_source_root: The root path where tests are located.
config.test_source_root = os.path.dirname(__file__)

# test_exec_root: The path where tests are executed.
config.test_exec_root = config.test_output_dir + '/compilator/'

# suffixes: A list of file types to treat as compilable.
config.suffixes = []
for language in DEUtils.getSupportedLanguages(config.gcc_executable):
    config.suffixes = config.suffixes + DEUtils.getSuffixesForLanguage(language)

config.language_flags = {
  'java'   : ['-fuse-boehm-gc']	# Otherwise gcc crashes
}

config.compilers = [
 [config.gcc_executable],
 [config.gcc_executable, '-fplugin=' + config.dragonegg_plugin]
]

config.compiler_flags = [[]]
def addMutuallyExclusiveFlags(flags):
    new_flags = []
    for flag in flags:
        new_args = [args + [flag] if flag else args for args in config.compiler_flags]
        new_flags = new_flags + new_args
    config.compiler_flags = new_flags

addMutuallyExclusiveFlags([None, '-O1', '-O2', '-O3'])
# The following are not mutually exclusive, but pretending they are speeds up
# testing.  Doing this fails to catch tests that pass with -g and also with
# -march=native but fail with -g -march=native etc.
addMutuallyExclusiveFlags([None, '-g', '-march=native', '-ffast-math'])

config.skip = [
    'gcc-testsuite/g++.dg/eh/cleanup1.C', # PR11811
    'gcc-testsuite/gnat.dg/frame_overflow.adb', # Fail to reject huge stack object; chews up all memory
    'gcc-testsuite/g++.dg/template/vtable2.C', # Some versions of GCC take forever
]

config.xfails = [
    # GCC crashes but we handle it correctly.
#    'gcc-testsuite/gcc.target/sparc/fpsub32s.c', # gcc-4.7 only
    'gcc-testsuite/g++.dg/torture/20120420-1.C',
    'gcc-testsuite/g++.dg/torture/pr53693.C',
    'gcc-testsuite/gcc.dg/torture/pr53790.c',

    # GCC fails to inline an always_inline function and considers this an error.
    # We fail to inline it too, but don't consider this to be an error, which is
    # fair enough.  What is less good is that we don't even output a warning...
#    'gcc-testsuite/gcc.dg/lto/20090218-1_0.c', # gcc-4.7 only
#    'gcc-testsuite/gcc.dg/always_inline2.c', # gcc-4.7 only
#    'gcc-testsuite/gcc.dg/always_inline3.c', # gcc-4.7 only
    'gcc-testsuite/c-c++-common/pr33763.c',

    # GCC rejects because a local variable is set to use a particular register
    # that doesn't exist.  We accept, never even noticing the problem because
    # the variable is not used.
    'gcc-testsuite/gcc.target/mips/no-dsp-1.c',
    'gcc-testsuite/gcc.target/mips/soft-float-1.c',

    # We don't reject a badly formed asm when compiling with -ffast-math because
    # the optimizers remove it as unused.
    'gcc-testsuite/gcc.target/sparc/sparc-dwarf2.c',

    # asm goto
    'gcc-testsuite/c-c++-common/asmgoto-3.c',
    'gcc-testsuite/c-c++-common/asmgoto-4.c',
    'gcc-testsuite/g++.dg/ext/asmgoto1.C',
    'gcc-testsuite/gcc.c-torture/compile/asmgoto-1.c',
    'gcc-testsuite/gcc.dg/lto/20100518_0.c',
    'gcc-testsuite/gcc.dg/torture/pr46068.c',
    'gcc-testsuite/gcc.dg/torture/pr53589.c',
    'gcc-testsuite/gcc.dg/tree-ssa/asmgoto-1.c',
    'gcc-testsuite/gcc.dg/Woverlength-strings-pedantic-c89-asm.c',
    'gcc-testsuite/gcc.dg/Woverlength-strings-pedantic-c90-asm.c',
    'gcc-testsuite/gcc.dg/Woverlength-strings-pedantic-c99-asm.c',
    'gcc-testsuite/gcc.target/i386/pr44071.c',
    'gcc-testsuite/gcc.target/i386/pr46226.c',
    'gcc-testsuite/gcc.c-torture/compile/pr51767.c',
    'gcc-testsuite/g++.dg/template/asmgoto1.C',

    # Both gcc-4.6 codegen and the plugin assert due to wrong gimple, however
    # gcc_assert produces exit code 1 while C++ assert gives exit code 4, so
    # causing the test to fail.  This difference is not worth caring about.
    'clang-testsuite/SemaTemplate/instantiate-typeof.cpp',

    # bitfields with non-integer type
    'gcc-testsuite/gnat.dg/aggr4.adb',
    'gcc-testsuite/gnat.dg/assign_from_packed.adb',
    'gcc-testsuite/gnat.dg/bit_packed_array1.adb',
    'gcc-testsuite/gnat.dg/dynamic_elab1.adb',
    'gcc-testsuite/gnat.dg/dynamic_elab2.adb',
    'gcc-testsuite/gnat.dg/in_out_parameter.adb',
    'gcc-testsuite/gnat.dg/lto10.adb',
    'gcc-testsuite/gnat.dg/misaligned_nest.adb',
    'gcc-testsuite/gnat.dg/oconst3.adb',
    'gcc-testsuite/gnat.dg/oconst5.adb',
    'gcc-testsuite/gnat.dg/oconst4.adb',
    'gcc-testsuite/gnat.dg/opt10.adb',
    'gcc-testsuite/gnat.dg/opt9.adb',
    'gcc-testsuite/gnat.dg/pack2.adb',
    'gcc-testsuite/gnat.dg/packed_subtype.adb',
    'gcc-testsuite/gnat.dg/rep_clause3.adb',
    'gcc-testsuite/gnat.dg/test_oconst.adb',
    'gcc-testsuite/gnat.dg/unaligned_rep_clause.adb',
    'gcc-testsuite/gnat.dg/specs/rep_clause4.ads',

    # calling/invoking a function with bad signature
    'gcc-testsuite/go.go-torture/execute/go-3.go',
    'gcc-testsuite/go.test/test/closedchan.go',
    'gcc-testsuite/go.test/test/convert.go',
    'gcc-testsuite/go.test/test/ddd.go',
    'gcc-testsuite/go.test/test/env.go',
    'gcc-testsuite/go.test/test/escape.go',
    'gcc-testsuite/go.test/test/fixedbugs/bug093.go',
    'gcc-testsuite/go.test/test/fixedbugs/bug099.go',
    'gcc-testsuite/go.test/test/fixedbugs/bug111.go',
    'gcc-testsuite/go.test/test/fixedbugs/bug130.go',
    'gcc-testsuite/go.test/test/fixedbugs/bug190.go',
    'gcc-testsuite/go.test/test/fixedbugs/bug206.go',
    'gcc-testsuite/go.test/test/fixedbugs/bug243.go',
    'gcc-testsuite/go.test/test/fixedbugs/bug257.go',
    'gcc-testsuite/go.test/test/fixedbugs/bug286.go',
    'gcc-testsuite/go.test/test/fixedbugs/bug296.go',
    'gcc-testsuite/go.test/test/hashmap.go',
    'gcc-testsuite/go.test/test/interface/bigdata.go',
    'gcc-testsuite/go.test/test/interface/convert.go',
    'gcc-testsuite/go.test/test/interface/fake.go',
    'gcc-testsuite/go.test/test/interface/receiver.go',
    'gcc-testsuite/go.test/test/interface/returntype.go',
    'gcc-testsuite/go.test/test/interface/struct.go',
    'gcc-testsuite/go.test/test/ken/embed.go',
    'gcc-testsuite/go.test/test/ken/interfun.go',
    'gcc-testsuite/go.test/test/ken/intervar.go',
    'gcc-testsuite/go.test/test/ken/rob1.go',
    'gcc-testsuite/go.test/test/method.go',
    'gcc-testsuite/go.test/test/method3.go',
    'gcc-testsuite/go.test/test/recover2.go',
    'gcc-testsuite/go.test/test/recover3.go',
    'gcc-testsuite/go.test/test/zerodivide.go',
    'gcc-libjava/classpath/lib/gnu/CORBA/CDR/UnknownExceptionCtxHandler.class',
    'gcc-libjava/classpath/lib/gnu/CORBA/CDR/Vio.class',
    'gcc-libjava/classpath/lib/gnu/CORBA/ObjectCreator.class',
    'gcc-libjava/classpath/lib/gnu/classpath/jdwp/processor/ReferenceTypeCommandSet.class',
    'gcc-libjava/classpath/lib/gnu/gcj/convert/BytesToUnicode.class',
    'gcc-libjava/classpath/lib/gnu/gcj/convert/UnicodeToBytes.class',
    'gcc-libjava/classpath/lib/gnu/java/awt/peer/headless/HeadlessGraphicsEnvironment.class',
    'gcc-libjava/classpath/lib/gnu/java/lang/management/BeanImpl.class',
    'gcc-libjava/classpath/lib/gnu/java/lang/reflect/ClassSignatureParser.class',
    'gcc-libjava/classpath/lib/gnu/java/lang/reflect/FieldSignatureParser.class',
    'gcc-libjava/classpath/lib/gnu/java/lang/reflect/MethodSignatureParser.class',
    'gcc-libjava/classpath/lib/gnu/java/rmi/server/ActivatableServerRef.class',
    'gcc-libjava/classpath/lib/gnu/java/rmi/server/RMIClassLoaderImpl.class',
    'gcc-libjava/classpath/lib/gnu/java/rmi/server/UnicastServerRef.class',
    'gcc-libjava/classpath/lib/gnu/java/security/Engine.class',
    'gcc-libjava/classpath/lib/gnu/java/security/PolicyFile.class',
    'gcc-libjava/classpath/lib/gnu/java/security/jce/sig/EncodedKeyFactory.class',
    'gcc-libjava/classpath/lib/gnu/java/security/key/KeyPairCodecFactory.class',
    'gcc-libjava/classpath/lib/gnu/java/security/key/KeyPairGeneratorFactory.class',
    'gcc-libjava/classpath/lib/gnu/javax/crypto/prng/CSPRNG.class',
    'gcc-libjava/classpath/lib/gnu/javax/crypto/sasl/AuthInfo.class',
    'gcc-libjava/classpath/lib/gnu/javax/management/Translator.class',
    'gcc-libjava/classpath/lib/gnu/javax/management/Server.class',
    'gcc-libjava/classpath/lib/gnu/javax/net/ssl/PrivateCredentials.class',
    'gcc-libjava/classpath/lib/gnu/javax/rmi/CORBA/PortableRemoteObjectDelegateImpl.class',
    'gcc-libjava/classpath/lib/gnu/javax/rmi/CORBA/RmiUtilities.class',
    'gcc-libjava/classpath/lib/gnu/javax/rmi/CORBA/UtilDelegateImpl.class',
    'gcc-libjava/classpath/lib/gnu/xml/dom/ImplementationSource.class',
    'gcc-libjava/classpath/lib/gnu/xml/pipeline/EventFilter.class',
    'gcc-libjava/classpath/lib/gnu/xml/pipeline/PipelineFactory$Stage.class',
    'gcc-libjava/classpath/lib/gnu/xml/stream/SAXParser.class',
    'gcc-libjava/classpath/lib/java/awt/GraphicsEnvironment.class',
    'gcc-libjava/classpath/lib/java/awt/datatransfer/DataFlavor.class',
    'gcc-libjava/classpath/lib/java/awt/im/InputContext.class',
    'gcc-libjava/classpath/lib/java/beans/Beans.class',
    'gcc-libjava/classpath/lib/java/beans/EventHandler.class',
    'gcc-libjava/classpath/lib/java/beans/ExplicitInfo.class',
    'gcc-libjava/classpath/lib/java/beans/beancontext/BeanContextSupport.class',
    'gcc-libjava/classpath/lib/java/io/ObjectInputStream.class',
    'gcc-libjava/classpath/lib/java/io/ObjectStreamClass.class',
    'gcc-libjava/classpath/lib/java/lang/ClassLoader.class',
    'gcc-libjava/classpath/lib/java/lang/Package.class',
    'gcc-libjava/classpath/lib/java/lang/SecurityManager.class',
    'gcc-libjava/classpath/lib/java/lang/Thread.class',
    'gcc-libjava/classpath/lib/java/lang/management/ManagementFactory.class',
    'gcc-libjava/classpath/lib/java/lang/reflect/Proxy$ClassFactory.class',
    'gcc-libjava/classpath/lib/java/net/DatagramSocket.class',
    'gcc-libjava/classpath/lib/java/net/URLClassLoader.class',
    'gcc-libjava/classpath/lib/java/net/URLConnection.class',
    'gcc-libjava/classpath/lib/java/nio/channels/spi/SelectorProvider.class',
    'gcc-libjava/classpath/lib/java/nio/charset/Charset.class',
    'gcc-libjava/classpath/lib/java/rmi/server/RemoteObject.class',
    'gcc-libjava/classpath/lib/java/security/Policy.class',
    'gcc-libjava/classpath/lib/java/security/SecureRandom.class',
    'gcc-libjava/classpath/lib/java/security/Security.class',
    'gcc-libjava/classpath/lib/java/security/VMAccessController.class',
    'gcc-libjava/classpath/lib/java/sql/DriverManager.class',
    'gcc-libjava/classpath/lib/java/text/BreakIterator.class',
    'gcc-libjava/classpath/lib/java/util/Calendar.class',
    'gcc-libjava/classpath/lib/java/util/ResourceBundle.class',
    'gcc-libjava/classpath/lib/java/util/prefs/Preferences$1.class',
    'gcc-libjava/classpath/lib/java/util/prefs/Preferences.class',
    'gcc-libjava/classpath/lib/javax/activation/CommandMap.class',
    'gcc-libjava/classpath/lib/javax/activation/DataHandler.class',
    'gcc-libjava/classpath/lib/javax/activation/FileTypeMap.class',
    'gcc-libjava/classpath/lib/javax/activation/MailcapCommandMap.class',
    'gcc-libjava/classpath/lib/javax/imageio/ImageIO.class',
    'gcc-libjava/classpath/lib/javax/imageio/metadata/IIOMetadata.class',
    'gcc-libjava/classpath/lib/javax/swing/UIDefaults$2.class',
    'gcc-libjava/classpath/lib/javax/swing/text/html/ObjectView.class',
    'gcc-libjava/classpath/lib/javax/xml/datatype/DatatypeFactory.class',
    'gcc-libjava/classpath/lib/org/relaxng/datatype/helpers/DatatypeLibraryLoader$Service$Loader.class',
    'gcc-libjava/classpath/lib/org/relaxng/datatype/helpers/DatatypeLibraryLoader$Service$Loader2.class',
    'gcc-libjava/classpath/lib/javax/management/JMX.class',
    'gcc-libjava/classpath/lib/javax/management/MBeanServerFactory.class',
    'gcc-libjava/classpath/lib/javax/management/MBeanServerInvocationHandler.class',
    'gcc-libjava/classpath/lib/javax/management/StandardMBean.class',
    'gcc-libjava/classpath/lib/javax/management/openmbean/ArrayType.class',
    'gcc-libjava/classpath/lib/javax/management/openmbean/OpenType.class',
    'gcc-libjava/classpath/lib/javax/naming/ldap/ControlFactory.class',
    'gcc-libjava/classpath/lib/javax/naming/spi/DirectoryManager.class',
    'gcc-libjava/classpath/lib/javax/naming/spi/NamingManager.class',
    'gcc-libjava/classpath/lib/javax/net/ServerSocketFactory.class',
    'gcc-libjava/classpath/lib/javax/net/SocketFactory.class',
    'gcc-libjava/classpath/lib/javax/security/auth/login/Configuration.class',
    'gcc-libjava/classpath/lib/javax/security/auth/login/LoginContext.class',
    'gcc-libjava/classpath/lib/javax/security/sasl/Sasl.class',
    'gcc-libjava/classpath/lib/javax/swing/UIDefaults$1.class',
    'gcc-libjava/classpath/lib/javax/swing/UIDefaults',
    'gcc-libjava/classpath/lib/javax/swing/UIDefaults$3.class',
    'gcc-libjava/classpath/lib/javax/swing/UIDefaults$4.class',
    'gcc-libjava/classpath/lib/javax/swing/text/html/ObjectView.class'
    'gcc-libjava/classpath/lib/javax/xml/datatype/DatatypeFactory.class',
    'gcc-libjava/classpath/lib/javax/xml/parsers/DocumentBuilderFactory.class',
    'gcc-libjava/classpath/lib/javax/xml/parsers/SAXParserFactory.class',
    'gcc-libjava/classpath/lib/javax/xml/stream/XMLEventFactory.class',
    'gcc-libjava/classpath/lib/javax/xml/stream/XMLInputFactory.class',
    'gcc-libjava/classpath/lib/javax/xml/stream/XMLOutputFactory.class',
    'gcc-libjava/classpath/lib/javax/xml/transform/TransformerFactory.class',
    'gcc-libjava/classpath/lib/javax/xml/validation/SchemaFactory.class',
    'gcc-libjava/classpath/lib/javax/xml/xpath/XPathFactory.class',
    'gcc-libjava/classpath/lib/org/ietf/jgss/GSSManager.class',
    'gcc-libjava/classpath/lib/org/relaxng/datatype/helpers/DatatypeLibraryLoader$Service$Loader.class',
    'gcc-libjava/classpath/lib/org/relaxng/datatype/helpers/DatatypeLibraryLoader$Service$Loader2.class',
    'gcc-libjava/classpath/lib/org/w3c/dom/bootstrap/DOMImplementationRegistry.class',
    'gcc-libjava/classpath/lib/org/xml/sax/helpers/NewInstance.class',
    'gcc-libjava/classpath/lib/sun/reflect/annotation/AnnotationInvocationHandler.class',
    'gcc-libjava/classpath/tools/classes/gnu/classpath/tools/common/CallbackUtil.class',
    'gcc-libjava/testsuite/libjava.jar/TestClosureGC.jar',
    'gcc-libjava/testsuite/libjava.lang/ExtraClassLoader.jar',
    'gcc-libjava/testsuite/libjava.lang/ProxyTest.jar',
    'gcc-libjava/testsuite/libjava.lang/TestProxy.jar',
    'gcc-libjava/testsuite/libjava.lang/WalkerTest.jar',
    'gcc-libjava/testsuite/libjava.lang/bytearray.jar',
    'gcc-libjava/testsuite/libjava.lang/pr17536.jar',
    'gcc-libjava/testsuite/libjava.lang/pr24321.jar',
    'gcc-libjava/testsuite/libjava.lang/stringconst2.jar',

    # f128
    'gcc-testsuite/c-c++-common/dfp/convert-bfp.c',
    'gcc-testsuite/c-c++-common/dfp/convert-bfp-2.c',
    'gcc-testsuite/c-c++-common/dfp/convert-bfp-3.c',
    'gcc-testsuite/c-c++-common/dfp/convert-bfp-4.c',
    'gcc-testsuite/c-c++-common/dfp/convert-bfp-5.c',
    'gcc-testsuite/c-c++-common/dfp/convert-bfp-6.c',
    'gcc-testsuite/c-c++-common/dfp/convert-bfp-11.c',
    'gcc-testsuite/c-c++-common/dfp/convert-bfp-fold.c',
    'gcc-testsuite/c-c++-common/dfp/pr39034.c',
    'gcc-testsuite/gcc.dg/dfp/convert-complex.c',
    'gcc-testsuite/gcc.dg/dfp/wtr-conversion-1.c',
    'gcc-testsuite/gcc.dg/torture/fp-int-convert-float128.c',
    'gcc-testsuite/gcc.target/i386/pr31854.c',
    'gcc-testsuite/gcc.target/i386/pr49168-1.c',
    'gcc-testsuite/gcc.target/ia64/postinc-1.c',
    'gcc-testsuite/gfortran.dg/quad_2.f90',
    'gcc-testsuite/gfortran.dg/io_real_boz_4.f90',

    # non-local goto or label (partly fixable)
    'gcc-testsuite/gcc.c-torture/compile/20050122-2.c',
    'gcc-testsuite/gcc.c-torture/compile/920415-1.c',
    'gcc-testsuite/gcc.c-torture/compile/pr21728.c',
    'gcc-testsuite/gcc.c-torture/execute/920415-1.c',
    'gcc-testsuite/gcc.c-torture/execute/920428-2.c',
    'gcc-testsuite/gcc.c-torture/execute/920501-7.c',
    'gcc-testsuite/gcc.c-torture/execute/920721-4.c',
    'gcc-testsuite/gcc.c-torture/execute/comp-goto-2.c',
    'gcc-testsuite/gcc.c-torture/execute/nestfunc-5.c',
    'gcc-testsuite/gcc.c-torture/execute/nestfunc-6.c',
    'gcc-testsuite/gcc.c-torture/execute/pr24135.c',
    'gcc-testsuite/gcc.dg/non-local-goto-1.c',
    'gcc-testsuite/gcc.dg/non-local-goto-2.c',
    'gcc-testsuite/gcc.dg/torture/stackalign/comp-goto-1.c',
    'gcc-testsuite/gcc.dg/torture/stackalign/nested-4.c',
    'gcc-testsuite/gcc.dg/torture/stackalign/nested-5.c',
    'gcc-testsuite/gcc.dg/torture/stackalign/non-local-goto-1.c',
    'gcc-testsuite/gcc.dg/torture/stackalign/nested-6.c',
    'gcc-testsuite/gcc.dg/torture/stackalign/non-local-goto-2.c',
    'gcc-testsuite/gcc.dg/torture/stackalign/non-local-goto-3.c',
    'gcc-testsuite/gcc.dg/torture/stackalign/non-local-goto-4.c',
    'gcc-testsuite/gcc.dg/torture/stackalign/non-local-goto-5.c',
    'gcc-testsuite/gcc.target/powerpc/darwin-save-world-1.c',
    'gcc-testsuite/gcc.dg/tree-prof/pr44777.c',

    # varargs thunk
    'gcc-testsuite/g++.dg/inherit/thunk1.C',
    'gcc-testsuite/g++.old-deja/g++.jason/thunk3.C',

    # weak ABI support
    'gcc-testsuite/gcc.target/x86_64/abi/test_struct_returning.c',
    'gcc-testsuite/gnat.dg/array3.adb',
    'gcc-testsuite/gnat.dg/curr_task.adb',
    'gcc-testsuite/gnat.dg/frunaligned.adb',
    'gcc-testsuite/gnat.dg/interface2.adb',
    'gcc-testsuite/gnat.dg/task_stack_align.adb',
    'gcc-testsuite/objc.dg/stret-2.m',

    # Miscellaneous failures
    'gcc-testsuite/c-c++-common/dfp/pr31385.c', # exposed a bug in GCC's native_encode_expr
    'gcc-testsuite/g++.dg/eh/ia64-1.C', # GCC accepts at -O1 or better because the optimizers removed the invalid register assignment
    'gcc-testsuite/g++.dg/ext/asm1.C', # PR11810
    'gcc-testsuite/g++.dg/ext/va-arg-pack-2.C', # Fails to reject invalid use of __builtin_va_arg_pack
    'gcc-testsuite/g++.dg/ext/va-arg-pack-len-2.C', # Not yet analyzed
    'gcc-testsuite/g++.dg/tree-ssa/pr42337.C', # GCC gives up at less than -O2
    'gcc-testsuite/g++.dg/ext/alias-canon2.C', # multiple fns with same name and neither are external!
    'gcc-testsuite/g++.dg/ext/attrib32.C', # multiple fns with same name and neither are external!  OK with gcc-4.7.
    'gcc-testsuite/gcc.c-torture/compile/20031023-4.c', # Stack variable doesn't fit in 32 bits
    'gcc-testsuite/gcc.c-torture/compile/limits-fndefn.c', # Huge function overflowed codegen's NodeId?
    'gcc-testsuite/gcc.dg/20020919-1.c', # Invalid asm not rejected
    'gcc-testsuite/gcc.dg/20051207-3.c', # Wrong section not rejected
    'gcc-testsuite/gcc.dg/tls/section-1.c', # Wrong section not rejected
    'gcc-testsuite/gcc.dg/asm-4.c', # Valid (?) asm rejected
    'gcc-testsuite/gcc.dg/guality/sra-1.c', # Assertion "Cannot assign into a bitfield!" failed
    'gcc-testsuite/gcc.dg/lto/pr47259_0.c', # Crash processing inline asm
    'gcc-testsuite/gcc.dg/pr42611.c', # Variable not rejected as being too big, we miscompile instead!
    'gcc-testsuite/gcc.dg/pr47276.c', # Alias wrongly rejected; OK with gcc-4.7
    'gcc-testsuite/gcc.dg/unwind-1.c', # Reject multiple functions with same assembler name
    'gcc-testsuite/gcc.dg/va-arg-pack-1.c', # Fail to reject invalid use of __builtin_va_arg_pack
    'gcc-testsuite/gcc.dg/va-arg-pack-len-2.c', # Fail to reject call to function with error attribute
    'gcc-testsuite/gcc.target/i386/builtin-copysign.c', # Missing support for builtin_fabsq
    'gcc-testsuite/gcc.target/i386/max-stack-align.c', # Invalid asm not rejected
    'gcc-testsuite/gcc.target/i386/pr30413.c', # Valid (?) asm rejected
    'gcc-testsuite/gcc.target/i386/pr39911.c', # Valid (?) asm rejected
    'gcc-testsuite/gcc.target/i386/pr9771-1.c', # Invalid (?) asm not rejected
    'gcc-testsuite/gcc.target/i386/quad-sse.c', # Missing support for builtin_fabsq
    'gcc-testsuite/gcc.target/i386/sse-13.c', # Missing support for builtin_ia32_bsrsi
    'gcc-testsuite/gcc.target/i386/sse-23.c', # Missing support for builtin_ia32_bsrsi
    'gcc-testsuite/gcc.target/i386/sse-24.c', # Missing support for builtin_ia32_bsrsi
    'gcc-testsuite/gcc.target/i386/sse-22.c', # Assertion "Not of memory type!" failed
    'gcc-testsuite/gcc.target/i386/vperm-v2df.c', # GCC rejects shuffle at -O0 due to non constant operands, OK with gcc-4.7
    'gcc-testsuite/gcc.target/i386/vperm-v2di.c', # GCC rejects shuffle at -O0 due to non constant operands, OK with gcc-4.7
    'gcc-testsuite/gcc.target/i386/vperm-v4sf-1.c', # GCC rejects shuffle at -O0 due to non constant operands, OK with gcc-4.7
    'gcc-testsuite/gcc.target/i386/vperm-v4si-1.c', # GCC rejects shuffle at -O0 due to non constant operands, OK with gcc-4.7
    'gcc-testsuite/gcc.target/i386/vperm-v4si-2-sse4.c', # GCC rejects shuffle at -O0 due to non constant operands, OK with gcc-4.7
    'gcc-testsuite/gcc.target/i386/vperm-v4sf-2.c', # GCC rejects shuffle at -O0 due to non constant operands, OK with gcc-4.7
    'gcc-testsuite/gcc.target/i386/vperm-v4si-2x.c', # GCC rejects shuffle at -O0 due to non constant operands, OK with gcc-4.7
    'gcc-testsuite/gcc.target/i386/vperm-v4si-2.c', # GCC rejects shuffle at -O0 due to non constant operands, OK with gcc-4.7
    'gcc-testsuite/gcc.target/ia64/pr43603.c', # GCC rejects inline asm with impossible constraint; we crash in codegen
    'gcc-testsuite/gcc.target/ia64/pr52657.c', # GCC rejects inline asm with impossible constraint; we crash in register allocation
    'gcc-testsuite/gcc.target/powerpc/recip-6.c', # GCC rejects inline asm with impossible constraint; we crash in codegen
    'gcc-testsuite/gcc.target/powerpc/recip-7.c', # GCC rejects inline asm; we crash in codegen
    'gcc-testsuite/gcc.target/powerpc/spe-unwind-1.c', # GCC rejects inline asm; we crash in codegen
    'gcc-testsuite/gcc.target/s390/20041109-1.c', # PR14114
    'gcc-testsuite/gcc.target/s390/20041216-1.c', # PR14114
    'gcc-testsuite/gcc.target/s390/20090223-1.c', # GCC rejects inline asm; we crash in codegen
    'gcc-testsuite/gcc.target/avr/pr46779-1.c', # GCC rejects inline asm with impossible constraint; we crash in register allocation
    'gcc-testsuite/gcc.target/avr/pr46779-2.c', # GCC rejects inline asm with impossible constraint; we crash in register allocation
    'gcc-testsuite/gcc.target/m68k/pr45015.c', # GCC rejects inline asm with impossible constraint; we crash in register allocation
    'gcc-testsuite/gcc.target/s390/pr24624.c', # GCC rejects inline asm with impossible constraint; we crash in register allocation
    'gcc-testsuite/gcc.target/powerpc/asm-es-1.c', # Fail to reject invalid asm
    'gcc-testsuite/gcc.target/powerpc/asm-y.c', # Valid (?) asm rejected
    'gcc-testsuite/gcc.target/powerpc/ppc64-abi-1.c', # Valid (?) asm rejected
    'gcc-testsuite/gcc.target/s390/20030129-1.c', # Fail to reject invalid (?) asm
    'gcc-testsuite/gcc.target/s390/pr20927.c', # Fail to reject invalid (?) asm
    'gcc-testsuite/gcc.target/s390/addr-constraints-1.c', # Crash in codegen with "Unknown constraint type!"
    'gcc-testsuite/go.test/test/fixedbugs/bug273.go', # Cache collision with decl_llvm
    'gcc-testsuite/go.test/test/fixedbugs/bug294.go', # Cache collision with decl_llvm
    'gcc-testsuite/go.test/test/interface/embed.go', # Cache collision with decl_llvm
    'local/c++/2004-11-27-InlineAsmFunctionRedefinition.cpp', # label emitted multiple times to assembly file
    'clang-testsuite/CodeGen/2003-10-29-AsmRename.c', # label emitted multiple times to assembly file
    'clang-testsuite/CodeGen/x86.c', # Impossible register constraint in asm not rejected
    'clang-testsuite/CodeGen/mmx-inline-asm.c', # Assertion "Only trivial scalar-to-vector conversions should get here!" failed
    'clang-testsuite/CodeGen/attributes.c', # Wrong section not rejected
    'clang-testsuite/CodeGen/arm-asm-variable.c', # Invalid register name not rejected
    'clang-testsuite/CodeGen/asm.c', # Invalid register name not rejected
    'clang-testsuite/CodeGen/mult-alt-generic.c', # Invalid register for constraint not rejected
    'clang-testsuite/CodeGen/struct-matching-constraint.c', # Impossible constraint in asm not rejected
    'clang-testsuite/Sema/2009-04-22-UnknownSize.c', # GCC rejects with: storage size isn't known
    'clang-testsuite/CodeGen/func-return-member.c', # Not yet handled by ABI code
    'clang-testsuite/SemaCXX/PR10447.cpp', # multiple fns with same name and neither are external!
    'gcc-testsuite/gcc.target/i386/pr47564.c', # Per-function target options not supported
    'gcc-testsuite/g++.dg/template/anonunion2.C', # Crash due to internal GCC bug
    'gcc-testsuite/gcc.dg/pr48335-6.c', # SROA crash, reported as PR15975
    'gcc-testsuite/gcc.dg/pr48335-7.c', # SROA crash, reported as PR15975
]

# testFormat: The test format to use to interpret tests.
config.test_format = DEFormats.CompilatorTest(config.compilers,
  config.compiler_flags, config.language_flags, config.skip, config.xfails)
